package contegor.scire.structure.queries;

import contegor.scire.core.Id;
import contegor.scire.core.Link;
import contegor.scire.core.TaskId;
import contegor.scire.core.queries.Condition;

public class CircularGetConceptsUpstreamReplicator extends Replicator<CircularGetConceptsUpstream> {
  private static final long serialVersionUID = -1216932406867220269L;

  private Condition<Link> condition;

  public CircularGetConceptsUpstreamReplicator(Condition<Link> condition) {
    super(CircularGetConceptsUpstream.class);
    this.condition = condition;
  }

  @Override
  public CircularGetConceptsUpstream replicate(TaskId id, Id targetId) {
    CircularGetConceptsUpstream aux = super.replicate(id, targetId);
    aux.setCondition(condition);
    return aux;
  }

  @Override
  public Replicator<CircularGetConceptsUpstream> clone() {
    return new CircularGetConceptsUpstreamReplicator(condition);
  }
}
